' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.12.16.16.28]) on 2024.02.10 at 18:37 (Coordinated Universal Time)
' This BAM port and mod by Charlie Veniot
' based on Ed Solie's one-liner Applesoft program found at:
' https://www.facebook.com/groups/2057165187928233/permalink/3571780083133395/?mibextid=uJjRxr

SCREEN _newimage(280,300,17) 

DIM I AS DOUBLE

i_start = 120
i_end = 0
DrawCycle:
 _DISPLAY
  PCOPY 0,1
  COLOR INT(RND * 64) + 1
  FOR I=i_start TO i_end STEP -0.05
    PSET ( I*COS(I)+140,20-I*(SIN(I)*0.2-2) )
  NEXT
  LINE (136,20) TO (140,12)
  LINE TO (144,20)
  LINE TO (134,16)
  LINE TO (146,16)
  LINE TO (136,20)  
  PCOPY 0,2
  PCOPY 1,0
  FOR Y = YMAX TO 0 STEP - 1
    PCOPY (0,Y) - (XMAX,Y), 2,0
    SLEEP 0.01
    _DISPLAY
  NEXT Y
  i_start = INT( RND * 120) + 1
  i_end = INT( RND * i_start ) 
GOTO DrawCycle